import java.util.Scanner;
public class TestDemo {
    public static int targer(int n){
        if(n==1){
            return 1;
        }
        else if(n==2){
            return 2;
        }
        else{
            return targer(n-1)+targer(n-2);
        }
    }

/*    public static void main2(String[] args){          //青蛙跳台阶问题
        Scanner sc=new Scanner(System.in);
        System.out.println("青蛙从第几阶开始跳：");
        int num=sc.nextInt();
        System.out.println("青蛙有"+targer(num)+"种方法跳台阶");
    }*/

 /*   public static void hannuota(int n, String a, String b, String c) {
        //最后一次将1模块这样移动
        if (n == 1) {
            System.out.println("将1模块从" + a + "移至" + c + "处");
        } else {
            //将第1至n-1模块从A塔移至工具塔（B塔）
            hannuota(n - 1, a, c, b);
            //1至n-1挪动完后，将第n个模块从A塔移至“C塔”
            System.out.println("将" + n + "模块从" + a + "移至" + c + "处");
            //将第n个模块移动完后将剩下的n-1个模块从B塔移动至C塔
            hannuota(n - 1, b, a, c);
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //输入要处理的模块数
        int n = sc.nextInt();
        //假设初始所有模块在A塔，要移动至C塔
        hannuota(n, "A塔", "B塔", "C塔");
        //计算汉诺塔最少移动次数
        double ret = Math.pow(2, n) - 1;
        System.out.println("至少要移动" + ret + "次");
    }*/

    public static int Fibonacci(int n){
        if(n==1||n==2){
            return 1;
        }
        return Fibonacci(n-1)+Fibonacci(n-2);
    }

/*    public static void main3(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(Fibonacci(n));
    }*/

        public static int sumNumber(int n){
            if(n<=9){
                return n;
            }
            return n%10+sumNumber(n/10);
        }

        /*public static void main3(String[] args) {            //求一位数每位之和
            {
                Scanner sc = new Scanner(System.in);
                System.out.println("请输入一个非负整数: ");
                int n = sc.nextInt();
                System.out.println(sumNumber(n));
            }
        }*/
    public static void addPrint(int n){
        if(n>10){
            addPrint(n/10);
        }
        System.out.print(n%10+" ");
    }
    public static int Add(int n){
        if(n==1){
            return 1;
        }
        return n+Add(n-1);
    }

    public static int Multiplication(int n){
        if(n==1){
            return 1;
        }
        return n*Multiplication(n-1);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        /*addPrint(n);*/
        /*System.out.println(Add(n));*/
        System.out.println(Multiplication(n));
    }
}
